package com._数组Demo1;
import java.util.Scanner;
public class Test5 {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int arr[] = new int[5];
        int b = 0;
        for (int i = 0; i<arr.length; i++) {
            System.out.println("请输入第" + (i +1)+ "数字");
            arr[i] = sc.nextInt();
            b += arr[i];
        }
        System.out.println("和:" +b);

    }
}
